#include <stdio.h>
#include <string.h>
#include <assert.h>

void Changes(char *Left, char *Right) {
    assert(Left);
    assert(Right);
    while (Left < Right) {
        char tmp = *Left;
        *Left = *Right;
        *Right = tmp;
        Left++;
        Right--;
    }
}

//三步翻转法
void L_Changes_R(char arr[10], int N) {
    assert(arr);
    int len = strlen(arr);
    Changes(arr, arr + len - 1); //整体逆序
}

int main() {
    char arr[] = "ABCDEFGH";
    L_Changes_R(arr, strlen(arr));
    printf("%s\n", arr);
    return 0;
}